package com.lagou.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;

@Controller
public class FileUploadController {

    public String fileUpload(String name, MultipartFile filePic) throws IOException {
        String filename = filePic.getOriginalFilename();
        filePic.transferTo(new File("E:/拉钩学习/upload"+filename));
        return "success";
    }
}
